/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "scsgtbautentic")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Scsgtbautentic.findAll", query = "SELECT s FROM Scsgtbautentic s"),
    @NamedQuery(name = "Scsgtbautentic.findByScsgtbautenticid", query = "SELECT s FROM Scsgtbautentic s WHERE s.scsgtbautenticid = :scsgtbautenticid"),
    @NamedQuery(name = "Scsgtbautentic.findByFechaauten", query = "SELECT s FROM Scsgtbautentic s WHERE s.fechaauten = :fechaauten"),
    @NamedQuery(name = "Scsgtbautentic.findByObservaciones", query = "SELECT s FROM Scsgtbautentic s WHERE s.observaciones = :observaciones")})
public class Scsgtbautentic implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "scsgtbautenticid")
    private Integer scsgtbautenticid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fechaauten")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaauten;
    @Size(max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @JoinColumn(name = "scthtbdatosgenid", referencedColumnName = "scthtbdatosgenid")
    @ManyToOne(optional = false)
    private Scthtbdatosgen scthtbdatosgenid;

    public Scsgtbautentic() {
    }

    public Scsgtbautentic(Integer scsgtbautenticid) {
        this.scsgtbautenticid = scsgtbautenticid;
    }

    public Scsgtbautentic(Integer scsgtbautenticid, Date fechaauten) {
        this.scsgtbautenticid = scsgtbautenticid;
        this.fechaauten = fechaauten;
    }

    public Integer getScsgtbautenticid() {
        return scsgtbautenticid;
    }

    public void setScsgtbautenticid(Integer scsgtbautenticid) {
        this.scsgtbautenticid = scsgtbautenticid;
    }

    public Date getFechaauten() {
        return fechaauten;
    }

    public void setFechaauten(Date fechaauten) {
        this.fechaauten = fechaauten;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Scthtbdatosgen getScthtbdatosgenid() {
        return scthtbdatosgenid;
    }

    public void setScthtbdatosgenid(Scthtbdatosgen scthtbdatosgenid) {
        this.scthtbdatosgenid = scthtbdatosgenid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scsgtbautenticid != null ? scsgtbautenticid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Scsgtbautentic)) {
            return false;
        }
        Scsgtbautentic other = (Scsgtbautentic) object;
        if ((this.scsgtbautenticid == null && other.scsgtbautenticid != null) || (this.scsgtbautenticid != null && !this.scsgtbautenticid.equals(other.scsgtbautenticid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Scsgtbautentic[ scsgtbautenticid=" + scsgtbautenticid + " ]";
    }
    
}
